package com.example.ktsb.service

import com.example.ktsb.entity.User
import com.example.ktsb.repository.UserRepository2
import com.example.ktsb.repository.UserRepository3
import org.springframework.stereotype.Service

interface UserService2 {
    fun findUser(): List<User>?
}

interface UserService3 {
    fun findUser()
}

@Service
class UserServiceImpl2(private val userRepository2: UserRepository2?) : UserService2 {

    private constructor() : this(null)

    override fun findUser(): List<User>? {
        return userRepository2?.findAll()
    }

}

class UserServiceImpl3(var userRepository3: UserRepository3?) : UserService3 {

    private constructor() : this(null)

    override fun findUser() {
        userRepository3?.findUser()
    }

}